pseudo_class: 'expanded',
});
- this._scrollView.add_actor(this._box);
+ this._scrollView.add_child(this._box);
this._items = new Map();
this.connect('key-focus-in', this._moveFocusToItems.bind(this));
this.removeItem(key);
let item = new AuthListItem(key, text);
- this._box.add(item);
+ this._box.add_child(item);
this._items.set(key, item);
});
this._userWidget = new UserWidget.UserWidget(this.user);
- layout.add(this._userWidget);
+ layout.add_child(this._userWidget);
this._userWidget.bind_property('label-actor',
this, 'label-actor',
scale_x: 0,
visible: false,
});
- layout.add(this._timedLoginIndicator);
+ layout.add_child(this._timedLoginIndicator);
this._onUserChanged();
}
pseudo_class: 'expanded',
});
- this.add_actor(this._box);
+ this.add_child(this._box);
this._items = {};
}
this._button = button;
this._menu = new PopupMenu.PopupMenu(this._button, 0, St.Side.BOTTOM);
- Main.uiGroup.add_actor(this._menu.actor);
+ Main.uiGroup.add_child(this._menu.actor);
this._menu.actor.hide();
this._menu.connect('open-state-changed', (menu, isOpen) => {
let bannerBox = new St.BoxLayout({vertical: true});
- this._bannerView.add_actor(bannerBox);
+ this._bannerView.add_child(bannerBox);
this._bannerLabel = new St.Label({
style_class: 'login-dialog-banner',
text: '',
let choices = options['choices'] || [];
let content = new Dialog.MessageDialogContent({title, description});
- this.contentLayout.add_actor(content);
+ this.contentLayout.add_child(content);
this._choices = new Map();
this._thumbnailsFocused = false;
});
- this.add_actor(this._thumbnails);
+ this.add_child(this._thumbnails);
// Need to force an allocation so we can figure out whether we
// need to scroll when selecting
this._window = null;
this._clone = new Clutter.Clone();
- this.add_actor(this._clone);
+ this.add_child(this._clone);
this._highlight = new St.Widget({style_class: 'cycler-highlight'});
- this.add_actor(this._highlight);
+ this.add_child(this._highlight);
let coordinate = Clutter.BindCoordinate.ALL;
let constraint = new Clutter.BindConstraint({coordinate});
this._items = this._getWindows();
this._highlight = new CyclerHighlight();
- global.window_group.add_actor(this._highlight);
+ global.window_group.add_child(this._highlight);
this._switcherList = new CyclerList();
this._switcherList.connect('item-highlighted', (list, index) => {
let arrow = new St.DrawingArea({style_class: 'switcher-arrow'});
arrow.connect('repaint', () => SwitcherPopup.drawArrow(arrow, St.Side.BOTTOM));
- this.add_actor(arrow);
+ this.add_child(arrow);
this._arrows.push(arrow);
if (appIcon.cachedWindows.length === 1)
let bin = new St.Bin({style_class: 'thumbnail'});
- box.add_actor(bin);
+ box.add_child(bin);
this._thumbnailBins.push(bin);
const title = windows[i].get_title();
x_align: Clutter.ActorAlign.CENTER,
});
this._labels.push(name);
- box.add_actor(name);
+ box.add_child(name);
this.addItem(box, name);
}
let clone = _createWindowClone(mutterWindow, thumbnailSize);
this._thumbnailBins[i].set_height(binHeight);
- this._thumbnailBins[i].add_actor(clone);
+ this._thumbnailBins[i].add_child(clone);
mutterWindow.connectObject('destroy',
source => this._removeThumbnail(source, clone), this);
switch (mode) {
case AppIconMode.THUMBNAIL_ONLY:
size = WINDOW_PREVIEW_SIZE;
- this._icon.add_actor(_createWindowClone(mutterWindow, size * scaleFactor));
+ this._icon.add_child(_createWindowClone(mutterWindow, size * scaleFactor));
break;
case AppIconMode.BOTH:
size = WINDOW_PREVIEW_SIZE;
- this._icon.add_actor(_createWindowClone(mutterWindow, size * scaleFactor));
+ this._icon.add_child(_createWindowClone(mutterWindow, size * scaleFactor));
if (this.app) {
- this._icon.add_actor(
+ this._icon.add_child(
this._createAppIcon(this.app, APP_ICON_SIZE_SMALL));
}
break;
case AppIconMode.APP_ICON_ONLY:
size = APP_ICON_SIZE;
- this._icon.add_actor(this._createAppIcon(this.app, size));
+ this._icon.add_child(this._createAppIcon(this.app, size));
}
this._icon.set_size(size * scaleFactor, size * scaleFactor);
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
});
- this.add_actor(this._label);
+ this.add_child(this._label);
this.windows = windows;
this.icons = [];
this._scrollTimeoutId = 0;
this._scrollView.connect('scroll-event', this._onScroll.bind(this));
- this._scrollView.add_actor(this._grid);
+ this._scrollView.add_child(this._grid);
const scroll = this._scrollView.hscroll;
this._adjustment = scroll.adjustment;
Main.overview.connectObject('hiding',
() => this._menu.close(), this);
- Main.uiGroup.add_actor(this._menu.actor);
+ Main.uiGroup.add_child(this._menu.actor);
this._menuManager.addMenu(this._menu);
}
style_class: 'audio-selection-device-icon',
icon_name: this._getDeviceIcon(device),
});
- box.add(icon);
+ box.add_child(icon);
const label = new St.Label({
style_class: 'audio-selection-device-label',
text: this._getDeviceLabel(device),
x_align: Clutter.ActorAlign.CENTER,
});
- box.add(label);
+ box.add_child(label);
const button = new St.Button({
style_class: 'audio-selection-device',
can_focus: true,
child: box,
});
- this._selectionBox.add(button);
+ this._selectionBox.add_child(button);
button.connect('clicked', () => {
this.emit('device-selected', device);
this.actor.add_style_class_name('background-menu');
- layoutManager.uiGroup.add_actor(this.actor);
+ layoutManager.uiGroup.add_child(this.actor);
this.actor.hide();
}
}
this._arrowOrigin = 0;
this._arrowActor = null;
this.bin = new St.Bin(binProperties);
- this.add_actor(this.bin);
+ this.add_child(this.bin);
this._border = new St.DrawingArea();
this._border.connect('repaint', this._drawBorder.bind(this));
- this.add_actor(this._border);
+ this.add_child(this._border);
this.set_child_above_sibling(this.bin, this._border);
this._sourceAlignment = 0.5;
this._muteKeys = true;
accessible_name: _('Previous month'),
can_focus: true,
});
- this._topBox.add(this._backButton);
+ this._topBox.add_child(this._backButton);
this._backButton.connect('clicked', this._onPrevMonthButtonClicked.bind(this));
this._monthLabel = new St.Label({
accessible_name: _('Next month'),
can_focus: true,
});
- this._topBox.add(this._forwardButton);
+ this._topBox.add_child(this._forwardButton);
this._forwardButton.connect('clicked', this._onNextMonthButtonClicked.bind(this));
// Add weekday labels...
this._date = new Date();
this._icon = new St.Icon({icon_name: 'no-notifications-symbolic'});
- this.add_actor(this._icon);
+ this.add_child(this._icon);
this._label = new St.Label({text: _('No Notifications')});
- this.add_actor(this._label);
+ this.add_child(this._label);
}
});
});
this._placeholder = new Placeholder();
- this.add_actor(this._placeholder);
+ this.add_child(this._placeholder);
let box = new St.BoxLayout({
vertical: true,
x_expand: true,
y_expand: true,
});
- this.add_actor(box);
+ this.add_child(box);
this._scrollView = new St.ScrollView({
style_class: 'vfade',
x_expand: true, y_expand: true,
});
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
- box.add_actor(this._scrollView);
+ box.add_child(this._scrollView);
let hbox = new St.BoxLayout({style_class: 'message-list-controls'});
box.add_child(hbox);
this._clearButton.connect('clicked', () => {
this._sectionList.get_children().forEach(s => s.clear());
});
- hbox.add_actor(this._clearButton);
+ hbox.add_child(this._clearButton);
this._placeholder.bind_property('visible',
this._clearButton, 'visible',
'actor-added', this._sync.bind(this),
'actor-removed', this._sync.bind(this),
this);
- this._scrollView.add_actor(this._sectionList);
+ this._scrollView.add_child(this._sectionList);
this._mediaSection = new Mpris.MediaSection();
this._addSection(this._mediaSection);
'notify::visible', this._sync.bind(this),
'notify::empty', this._sync.bind(this),
'notify::can-clear', this._sync.bind(this),
- 'destroy', () => this._sectionList.remove_actor(section),
+ 'destroy', () => this._sectionList.remove_child(section),
'message-focused', (_s, messageActor) => {
ensureActorVisibleInScrollView(this._scrollView, messageActor);
}, this);
- this._sectionList.add_actor(section);
+ this._sectionList.add_child(section);
}
_sync() {
this.set_accessible_role(Atk.Role.CHECK_BOX);
this._box = new St.Bin({y_align: Clutter.ActorAlign.START});
- container.add_actor(this._box);
+ container.add_child(this._box);
this._label = new St.Label({y_align: Clutter.ActorAlign.CENTER});
this._label.clutter_text.set_line_wrap(true);
this._label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
this.set_label_actor(this._label);
- container.add_actor(this._label);
+ container.add_child(this._label);
if (label)
this.setLabel(label);
gicon: app.get_icon(),
style_class: 'hotplug-notification-item-icon',
});
- box.add(icon);
+ box.add_child(icon);
let label = new St.Bin({
child: new St.Label({
y_align: Clutter.ActorAlign.CENTER,
}),
});
- box.add(label);
+ box.add_child(label);
const button = new St.Button({
child: box,
style_class: 'chat-body',
vertical: true,
});
- this._scrollArea.add_actor(this._contentArea);
+ this._scrollArea.add_child(this._contentArea);
this.setExpandedBody(this._scrollArea);
this.setExpandedLines(CHAT_EXPAND_LINES);
}
let lineBox = new ChatLineBox();
- lineBox.add(body);
- this._contentArea.add_actor(lineBox);
+ lineBox.add_child(body);
+ this._contentArea.add_child(lineBox);
this._messageActors.set(message, lineBox);
this._updateTimestamp(message);
timeLabel.x_expand = timeLabel.y_expand = true;
timeLabel.x_align = timeLabel.y_align = Clutter.ActorAlign.END;
- actor.add_actor(timeLabel);
+ actor.add_child(timeLabel);
}
}
this.child = actor;
this.child.y_expand = true;
- this.add_actor(this.child);
+ this.add_child(this.child);
}
show(animate) {
});
this.icon.y_align = Clutter.ActorAlign.CENTER;
- this.toggleButton.add_actor(this.icon);
+ this.toggleButton.add_child(this.icon);
this.toggleButton._delegate = this;
this.setChild(this.toggleButton);
});
const hbox = new St.BoxLayout({vertical: true});
- this.add_actor(hbox);
+ this.add_child(hbox);
this._dayLabel = new St.Label({
style_class: 'day-label',
x_align: Clutter.ActorAlign.START,
});
- hbox.add_actor(this._dayLabel);
+ hbox.add_child(this._dayLabel);
this._dateLabel = new St.Label({style_class: 'date-label'});
- hbox.add_actor(this._dateLabel);
+ hbox.add_child(this._dateLabel);
this._calendar = calendar;
this._calendar.connect('selected-date-changed', (_calendar, datetime) => {
style_class: 'event-box',
vertical: true,
});
- box.add(new St.Label({
+ box.add_child(new St.Label({
text: event.summary,
style_class: 'event-summary',
}));
- box.add(new St.Label({
+ box.add_child(new St.Label({
text: this._formatEventTime(event),
style_class: 'event-time',
}));
}));
let box = new St.BoxLayout({style_class: 'clock-display-box'});
- box.add_actor(indicatorPad);
- box.add_actor(this._clockDisplay);
- box.add_actor(this._indicator);
+ box.add_child(indicatorPad);
+ box.add_child(this._clockDisplay);
+ box.add_child(this._indicator);
this.label_actor = this._clockDisplay;
- this.add_actor(box);
+ this.add_child(box);
this.add_style_class_name('clock-display');
let layout = new FreezableBinLayout();
this.menu.box.add_child(bin);
hbox = new St.BoxLayout({name: 'calendarArea'});
- bin.add_actor(hbox);
+ bin.add_child(hbox);
this._calendar = new Calendar.Calendar();
this._calendar.connect('selected-date-changed', (_calendar, datetime) => {
layout_manager: boxLayout,
});
boxLayout.hookup_style(vbox);
- hbox.add(vbox);
+ hbox.add_child(vbox);
- vbox.add_actor(this._date);
- vbox.add_actor(this._calendar);
+ vbox.add_child(this._date);
+ vbox.add_child(this._calendar);
this._displaysSection = new St.ScrollView({
style_class: 'datemenu-displays-section vfade',
overlay_scrollbars: true,
});
this._displaysSection.set_policy(St.PolicyType.NEVER, St.PolicyType.EXTERNAL);
- vbox.add_actor(this._displaysSection);
+ vbox.add_child(this._displaysSection);
const displaysBox = new St.BoxLayout({
vertical: true,
x_expand: true,
style_class: 'datemenu-displays-box',
});
- this._displaysSection.add_actor(displaysBox);
+ this._displaysSection.add_child(displaysBox);
this._eventsItem = new EventsSection();
displaysBox.add_child(this._eventsItem);
for (let i in keys)
this._buttonKeys[keys[i]] = buttonInfo;
- this.buttonLayout.add_actor(button);
+ this.buttonLayout.add_child(button);
return button;
}
style_class: 'dialog-list-box',
vertical: true,
});
- this._listScrollView.add_actor(this.list);
+ this._listScrollView.add_child(this.list);
let defaultParams = {
style_class: 'dialog-list',
function _getEventHandlerActor() {
if (!eventHandlerActor) {
eventHandlerActor = new Clutter.Actor({width: 0, height: 0, reactive: true});
- Main.uiGroup.add_actor(eventHandlerActor);
+ Main.uiGroup.add_child(eventHandlerActor);
// We connect to 'event' rather than 'captured-event' because the capturing phase doesn't happen
// when you've grabbed the pointer.
eventHandlerActor.connect('event', (actor, event) => {
this._dragActor.scale_x = scaledWidth / this._dragOrigWidth;
this._dragActor.scale_y = scaledHeight / this._dragOrigHeight;
- this._dragOrigParent.remove_actor(this._dragActor);
+ this._dragOrigParent.remove_child(this._dragActor);
Main.uiGroup.add_child(this._dragActor);
Main.uiGroup.set_child_above_sibling(this._dragActor, null);
Shell.util_set_hidden_from_pick(this._dragActor, true);
_onAnimationComplete(dragActor, eventTime) {
if (this._dragOrigParent) {
Main.uiGroup.remove_child(this._dragActor);
- this._dragOrigParent.add_actor(this._dragActor);
+ this._dragOrigParent.add_child(this._dragActor);
dragActor.set_scale(this._dragOrigScale, this._dragOrigScale);
if (this._dragActorHadFixedPos)
dragActor.set_position(this._dragOrigX, this._dragOrigY);
description: _('Download and install “%s” from extensions.gnome.org?').format(info.name),
});
- this.contentLayout.add(content);
+ this.contentLayout.add_child(content);
}
_onCancelButtonPressed() {
box.add_child(box._indexLabel);
box.add_child(box._candidateLabel);
this._candidateBoxes.push(box);
- this.add(box);
+ this.add_child(box);
let j = i;
box.connect('button-release-event', (actor, event) => {
});
this._buttonBox.add_child(this._nextButton);
- this.add(this._buttonBox);
+ this.add_child(this._buttonBox);
this._previousButton.connect('clicked', () => {
this.emit('previous-page');
this.style_class = 'candidate-popup-boxpointer';
this._dummyCursor = new Clutter.Actor({opacity: 0});
- Main.layoutManager.uiGroup.add_actor(this._dummyCursor);
+ Main.layoutManager.uiGroup.add_child(this._dummyCursor);
Main.layoutManager.addTopChrome(this);
style_class: 'candidate-popup-text',
visible: false,
});
- box.add(this._preeditText);
+ box.add_child(this._preeditText);
this._auxText = new St.Label({
style_class: 'candidate-popup-text',
visible: false,
});
- box.add(this._auxText);
+ box.add_child(this._auxText);
this._candidateArea = new CandidateArea();
- box.add(this._candidateArea);
+ box.add_child(this._candidateArea);
this._candidateArea.connect('previous-page', () => {
this._panelService.page_up();
this.iconSize = ICON_SIZE;
this._iconBin = new St.Bin({x_align: Clutter.ActorAlign.CENTER});
- this._box.add_actor(this._iconBin);
+ this._box.add_child(this._iconBin);
if (params.showLabel) {
this.label = new St.Label({text: label});
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
});
- this._box.add_actor(this.label);
+ this._box.add_child(this.label);
} else {
this.label = null;
}
actorClone.opacity = 255;
actorClone.set_pivot_point(0.5, 0.5);
- Main.uiGroup.add_actor(actorClone);
+ Main.uiGroup.add_child(actorClone);
// Avoid monitor edges to not zoom outside the current monitor
let scaledWidth = width * APPICON_ANIMATION_OUT_SCALE;
let key = this._makeKey(extendedKey);
key.extendedKey = extendedKey;
- this._extendedKeyboard.add(key);
+ this._extendedKeyboard.add_child(key);
key.set_size(...this.keyButton.allocation.get_size());
this.keyButton.connect('notify::allocation',
() => key.set_size(...this.keyButton.allocation.get_size()));
}
- this._boxPointer.bin.add_actor(this._extendedKeyboard);
+ this._boxPointer.bin.add_child(this._extendedKeyboard);
}
get subkeys() {
this._keyboardController.destroy();
Main.layoutManager.untrackChrome(this);
- Main.layoutManager.keyboardBox.remove_actor(this);
+ Main.layoutManager.keyboardBox.remove_child(this);
Main.layoutManager.keyboardBox.hide();
if (this._languagePopup) {
}
_setupKeyboard() {
- Main.layoutManager.keyboardBox.add_actor(this);
+ Main.layoutManager.keyboardBox.add_child(this);
Main.layoutManager.trackChrome(this);
this._keyboardController = new KeyboardController();
global.stage.add_child(this.uiGroup);
- global.stage.remove_actor(global.window_group);
- this.uiGroup.add_actor(global.window_group);
+ global.stage.remove_child(global.window_group);
+ this.uiGroup.add_child(global.window_group);
global.connect('shutdown', () => {
const monitorManager = global.backend.get_monitor_manager();
monitorManager.disconnectObject(this);
];
for (let adoptedActor of adoptedUiGroupActors) {
- this.uiGroup.remove_actor(adoptedActor);
- global.stage.add_actor(adoptedActor);
+ this.uiGroup.remove_child(adoptedActor);
+ global.stage.add_child(adoptedActor);
}
this._destroyHotCorners();
// Using addChrome() to add actors to uiGroup will position actors
// underneath the top_window_group.
// To insert actors at the top of uiGroup, we use addTopChrome() or
- // add the actor directly using uiGroup.add_actor().
- global.stage.remove_actor(global.top_window_group);
- this.uiGroup.add_actor(global.top_window_group);
+ // add the actor directly using uiGroup.add_child().
+ global.stage.remove_child(global.top_window_group);
+ this.uiGroup.add_child(global.top_window_group);
this.overviewGroup = new St.Widget({
name: 'overviewGroup',
name: 'modalDialogGroup',
layout_manager: new Clutter.BinLayout(),
});
- this.uiGroup.add_actor(this.modalDialogGroup);
+ this.uiGroup.add_child(this.modalDialogGroup);
this.keyboardBox = new St.BoxLayout({
name: 'keyboardBox',
// A dummy actor that tracks the mouse or text cursor, based on the
// position and size set in setDummyCursorGeometry.
this.dummyCursor = new St.Widget({width: 0, height: 0, opacity: 0});
- this.uiGroup.add_actor(this.dummyCursor);
+ this.uiGroup.add_child(this.dummyCursor);
let feedbackGroup = Meta.get_feedback_group_for_display(global.display);
- global.stage.remove_actor(feedbackGroup);
- this.uiGroup.add_actor(feedbackGroup);
+ global.stage.remove_child(feedbackGroup);
+ this.uiGroup.add_child(feedbackGroup);
this._backgroundGroup = new Meta.BackgroundGroup();
global.window_group.add_child(this._backgroundGroup);
// monitor (it will be hidden whenever a fullscreen window is visible,
// and shown otherwise)
addChrome(actor, params) {
- this.uiGroup.add_actor(actor);
+ this.uiGroup.add_child(actor);
if (this.uiGroup.contains(global.top_window_group))
this.uiGroup.set_child_below_sibling(actor, global.top_window_group);
this._trackActor(actor, params);
//
// Like addChrome(), but adds @actor above all windows, including popups.
addTopChrome(actor, params) {
- this.uiGroup.add_actor(actor);
+ this.uiGroup.add_child(actor);
this._trackActor(actor, params);
}
//
// Removes @actor from the chrome
removeChrome(actor) {
- this.uiGroup.remove_actor(actor);
+ this.uiGroup.remove_child(actor);
this._untrackActor(actor);
}
else
this.set({opacity: 0, style_class: 'lightbox'});
- container.add_actor(this);
+ container.add_child(this);
container.set_child_above_sibling(this, null);
this.connect('destroy', this._onDestroy.bind(this));
return true;
});
labelBox.add_child(label);
- this.tabControls.add(labelBox);
+ this.tabControls.add_child(labelBox);
let scrollview = new St.ScrollView({y_expand: true});
scrollview.get_hscroll_bar().hide();
- scrollview.add_actor(child);
+ scrollview.add_child(child);
const tabData = {
child,
let cmdTxt = new St.Label({text: command});
cmdTxt.clutter_text.ellipsize = Pango.EllipsizeMode.END;
- this.add(cmdTxt);
+ this.add_child(cmdTxt);
let box = new St.BoxLayout({});
- this.add(box);
+ this.add_child(box);
let resultTxt = new St.Label({text: `r(${index}) = `});
resultTxt.clutter_text.ellipsize = Pango.EllipsizeMode.END;
- box.add(resultTxt);
+ box.add_child(resultTxt);
let objLink = new ObjLink(this._lookingGlass, o);
- box.add(objLink);
+ box.add_child(objLink);
}
});
metaWindow._lookingGlassManaged = true;
}
let box = new St.BoxLayout({vertical: true});
- this.add(box);
+ this.add_child(box);
let windowLink = new ObjLink(this._lookingGlass, metaWindow, metaWindow.title);
box.add_child(windowLink);
let propsBox = new St.BoxLayout({vertical: true, style: 'padding-left: 6px;'});
- box.add(propsBox);
- propsBox.add(new St.Label({text: `wmclass: ${metaWindow.get_wm_class()}`}));
+ box.add_child(propsBox);
+ propsBox.add_child(new St.Label({text: `wmclass: ${metaWindow.get_wm_class()}`}));
let app = tracker.get_window_app(metaWindow);
if (app != null && !app.is_window_backed()) {
let icon = app.create_icon_texture(22);
let propBox = new St.BoxLayout({style: 'spacing: 6px; '});
- propsBox.add(propBox);
+ propsBox.add_child(propBox);
propBox.add_child(new St.Label({text: 'app: '}));
let appLink = new ObjLink(this._lookingGlass, app, app.get_id());
propBox.add_child(appLink);
propBox.add_child(icon);
} else {
- propsBox.add(new St.Label({text: '<untracked>'}));
+ propsBox.add_child(new St.Label({text: '<untracked>'}));
}
}
}
x_expand: true,
y_expand: true,
});
- this.add_actor(this._container);
+ this.add_child(this._container);
this._lookingGlass = lookingGlass;
}
this._container.destroy_all_children();
let hbox = new St.BoxLayout({style_class: 'lg-obj-inspector-title'});
- this._container.add_actor(hbox);
+ this._container.add_child(hbox);
let label = new St.Label({
text: `Inspecting: ${typeof obj}: ${objectToString(obj)}`,
x_expand: true,
hbox.add_child(label);
let button = new St.Button({label: 'Insert', style_class: 'lg-obj-inspector-button'});
button.connect('clicked', this._onInsert.bind(this));
- hbox.add(button);
+ hbox.add_child(button);
if (this._previousObj != null) {
button = new St.Button({label: 'Back', style_class: 'lg-obj-inspector-button'});
button.connect('clicked', this._onBack.bind(this));
- hbox.add(button);
+ hbox.add_child(button);
}
button = new St.Button({
icon_name: 'window-close-symbolic',
});
button.connect('clicked', this.close.bind(this));
- hbox.add(button);
+ hbox.add_child(button);
if (typeof obj === typeof {}) {
let properties = [];
for (let propName in obj)
link = new St.Label({text: '<error>'});
}
let box = new St.BoxLayout();
- box.add(new St.Label({text: `${propName}: `}));
- box.add(link);
- this._container.add_actor(box);
+ box.add_child(new St.Label({text: `${propName}: `}));
+ box.add_child(link);
+ this._container.add_child(box);
}
}
}
_init(lookingGlass) {
super._init({width: 0, height: 0});
- Main.uiGroup.add_actor(this);
+ Main.uiGroup.add_child(this);
const eventHandler = new St.BoxLayout({
name: 'LookingGlassDialog',
reactive: true,
});
this._eventHandler = eventHandler;
- this.add_actor(eventHandler);
+ this.add_child(eventHandler);
this._displayText = new St.Label({x_expand: true});
eventHandler.add_child(this._displayText);
vertical: true,
style_class: 'lg-extensions-list',
});
- this._extensionsList.add(this._noExtensions);
- this.add(this._extensionsList);
+ this._extensionsList.add_child(this._noExtensions);
+ this.add_child(this._extensionsList);
Main.extensionManager.getUuids().forEach(uuid => {
this._loadExtension(null, uuid);
let extensionDisplay = this._createExtensionDisplay(extension);
if (this._numExtensions === 0)
- this._extensionsList.remove_actor(this._noExtensions);
+ this._extensionsList.remove_child(this._noExtensions);
this._numExtensions++;
const {name} = extension.metadata;
let errorDisplay = new St.BoxLayout({vertical: true});
if (errors && errors.length) {
for (let i = 0; i < errors.length; i++)
- errorDisplay.add(new St.Label({text: errors[i]}));
+ errorDisplay.add_child(new St.Label({text: errors[i]}));
} else {
/* Translators: argument is an extension UUID. */
let message = _('%s has not emitted any errors.').format(extension.uuid);
- errorDisplay.add(new St.Label({text: message}));
+ errorDisplay.add_child(new St.Label({text: message}));
}
actor._errorDisplay = errorDisplay;
- actor._parentBox.add(errorDisplay);
+ actor._parentBox.add_child(errorDisplay);
actor.label = _('Hide Errors');
} else {
actor._errorDisplay.destroy();
box.add_child(description);
let metaBox = new St.BoxLayout({style_class: 'lg-extension-meta'});
- box.add(metaBox);
+ box.add_child(metaBox);
const state = new St.Label({
style_class: 'lg-extension-state',
text: this._stateToString(extension.state),
});
- metaBox.add(state);
+ metaBox.add_child(state);
const viewsource = new St.Button({
reactive: true,
});
viewsource._extension = extension;
viewsource.connect('clicked', this._onViewSource.bind(this));
- metaBox.add(viewsource);
+ metaBox.add_child(viewsource);
if (extension.metadata.url) {
const webpage = new St.Button({
});
webpage._extension = extension;
webpage.connect('clicked', this._onWebPage.bind(this));
- metaBox.add(webpage);
+ metaBox.add_child(webpage);
}
const viewerrors = new St.Button({
viewerrors._parentBox = box;
viewerrors._isShowing = false;
viewerrors.connect('clicked', this._onViewErrors.bind(this));
- metaBox.add(viewerrors);
+ metaBox.add_child(viewerrors);
return box;
}
this._updateFont();
// We want it to appear to slide out from underneath the panel
- Main.uiGroup.add_actor(this);
+ Main.uiGroup.add_child(this);
Main.uiGroup.set_child_below_sibling(this,
Main.layoutManager.panelBox);
Main.layoutManager.panelBox.connect('notify::allocation',
this._queueResize.bind(this));
this._objInspector = new ObjInspector(this);
- Main.uiGroup.add_actor(this._objInspector);
+ Main.uiGroup.add_child(this._objInspector);
this._objInspector.hide();
let toolbar = new St.BoxLayout({name: 'Toolbar'});
- this.add_actor(toolbar);
+ this.add_child(toolbar);
const inspectButton = new St.Button({
style_class: 'lg-toolbar-button',
icon_name: 'find-location-symbolic',
});
- toolbar.add_actor(inspectButton);
+ toolbar.add_child(inspectButton);
inspectButton.connect('clicked', () => {
let inspector = new Inspector(this);
inspector.connect('target', (i, target, stageX, stageY) => {
style_class: 'lg-toolbar-button',
icon_name: 'user-trash-full-symbolic',
});
- toolbar.add_actor(gcButton);
+ toolbar.add_child(gcButton);
gcButton.connect('clicked', () => {
gcButton.child.icon_name = 'user-trash-symbolic';
System.gc();
let emptyBox = new St.Bin({x_expand: true});
toolbar.add_child(emptyBox);
- toolbar.add_actor(notebook.tabControls);
+ toolbar.add_child(notebook.tabControls);
this._evalBox = new St.BoxLayout({name: 'EvalBox', vertical: true});
notebook.appendPage('Evaluator', this._evalBox);
name: 'EntryArea',
y_align: Clutter.ActorAlign.END,
});
- this._evalBox.add_actor(this._entryArea);
+ this._evalBox.add_child(this._entryArea);
let label = new St.Label({text: CHEVRON});
- this._entryArea.add(label);
+ this._entryArea.add_child(label);
this._entry = new St.Entry({
can_focus: true,
_pushResult(command, obj) {
let index = this._resultsArea.get_n_children() + this._offset;
let result = new Result(this, CHEVRON + command, obj, index);
- this._resultsArea.add(result);
+ this._resultsArea.add_child(result);
if (obj instanceof Clutter.Actor)
this.setBorderPaintTarget(obj);
this._mouseSprite.content = new MouseSpriteContent();
this._cursorRoot = new Clutter.Actor();
- this._cursorRoot.add_actor(this._mouseSprite);
+ this._cursorRoot.add_child(this._mouseSprite);
// Create the first ZoomRegion and initialize it according to the
// magnification settings.
_createActors() {
// The root actor for the zoom region
this._magView = new St.Bin({style_class: 'magnifier-zoom-region'});
- global.stage.add_actor(this._magView);
+ global.stage.add_child(this._magView);
// hide the magnified region from CLUTTER_PICK_ALL
Shell.util_set_hidden_from_pick(this._magView, true);
// Add a background for when the magnified uiGroup is scrolled
// out of view (don't want to see desktop showing through).
this._background = new Background.SystemBackground();
- mainGroup.add_actor(this._background);
+ mainGroup.add_child(this._background);
// Clone the group that contains all of UI on the screen. This is the
// chrome, the windows, etc.
source: Main.uiGroup,
clip_to_allocation: true,
});
- mainGroup.add_actor(this._uiGroupClone);
+ mainGroup.add_child(this._uiGroupClone);
// Add either the given mouseSourceActor to the ZoomRegion, or a clone of
// it.
this._mouseActor = new Clutter.Clone({source: this._mouseSourceActor});
else
this._mouseActor = this._mouseSourceActor;
- mainGroup.add_actor(this._mouseActor);
+ mainGroup.add_child(this._mouseActor);
if (this._crossHairs)
this._crossHairsActor = this._crossHairs.addToZoomRegion(this, this._mouseActor);
_destroyActors() {
if (this._mouseActor === this._mouseSourceActor)
- this._mouseActor.get_parent().remove_actor(this._mouseActor);
+ this._mouseActor.get_parent().remove_child(this._mouseActor);
if (this._crossHairs)
this._crossHairs.removeFromParent(this._crossHairsActor);
this._horizRightHair = new Clutter.Actor();
this._vertTopHair = new Clutter.Actor();
this._vertBottomHair = new Clutter.Actor();
- this.add_actor(this._horizLeftHair);
- this.add_actor(this._horizRightHair);
- this.add_actor(this._vertTopHair);
- this.add_actor(this._vertBottomHair);
+ this.add_child(this._horizLeftHair);
+ this.add_child(this._horizRightHair);
+ this.add_child(this._vertTopHair);
+ this.add_child(this._vertBottomHair);
this._clipSize = [0, 0];
this._clones = [];
this.reCenter();
GObject.BindingFlags.SYNC_CREATE);
}
- container.add_actor(crosshairsActor);
+ container.add_child(crosshairsActor);
container.set_child_above_sibling(magnifiedMouse, crosshairsActor);
let [xMouse, yMouse] = magnifiedMouse.get_position();
let [crosshairsWidth, crosshairsHeight] = crosshairsActor.get_size();
*/
removeFromParent(childActor) {
if (childActor === this)
- childActor.get_parent().remove_actor(childActor);
+ childActor.get_parent().remove_child(childActor);
else
childActor.destroy();
}
this.set_child(vbox);
let hbox = new St.BoxLayout();
- vbox.add_actor(hbox);
+ vbox.add_child(hbox);
this._actionBin = new St.Widget({
layout_manager: new ScaleLayout(),
visible: false,
});
- vbox.add_actor(this._actionBin);
+ vbox.add_child(this._actionBin);
this._iconBin = new St.Bin({
style_class: 'message-icon-bin',
y_align: Clutter.ActorAlign.START,
visible: false,
});
- hbox.add_actor(this._iconBin);
+ hbox.add_child(this._iconBin);
const contentBox = new St.BoxLayout({
style_class: 'message-content',
vertical: true,
x_expand: true,
});
- hbox.add_actor(contentBox);
+ hbox.add_child(contentBox);
this._mediaControls = new St.BoxLayout();
- hbox.add_actor(this._mediaControls);
+ hbox.add_child(this._mediaControls);
let titleBox = new St.BoxLayout();
- contentBox.add_actor(titleBox);
+ contentBox.add_child(titleBox);
this.titleLabel = new St.Label({style_class: 'message-title'});
this.setTitle(title);
- titleBox.add_actor(this.titleLabel);
+ titleBox.add_child(this.titleLabel);
this._secondaryBin = new St.Bin({
style_class: 'message-secondary-bin',
x_expand: true, y_expand: true,
});
- titleBox.add_actor(this._secondaryBin);
+ titleBox.add_child(this._secondaryBin);
this._closeButton = new St.Button({
style_class: 'message-close-button',
y_align: Clutter.ActorAlign.CENTER,
opacity: 0,
});
- titleBox.add_actor(this._closeButton);
+ titleBox.add_child(this._closeButton);
this._bodyStack = new St.Widget({x_expand: true});
this._bodyStack.layout_manager = new LabelExpanderLayout();
- contentBox.add_actor(this._bodyStack);
+ contentBox.add_child(this._bodyStack);
this.bodyLabel = new URLHighlighter('', false, this._useBodyMarkup);
this.bodyLabel.add_style_class_name('message-body');
- this._bodyStack.add_actor(this.bodyLabel);
+ this._bodyStack.add_child(this.bodyLabel);
this.setBody(body);
this._closeButton.connect('clicked', this.close.bind(this));
if (this._actionBin.get_n_children() > 0)
throw new Error('Message already has an action area');
- this._actionBin.add_actor(actor);
+ this._actionBin.add_child(actor);
this._actionBin.visible = this.expanded;
}
iconName,
});
button.connect('clicked', callback);
- this._mediaControls.add_actor(button);
+ this._mediaControls.add_child(button);
return button;
}
style_class: 'message-list-section-list',
vertical: true,
});
- this.add_actor(this._list);
+ this.add_child(this._list);
this._list.connect('actor-added', this._sync.bind(this));
this._list.connect('actor-removed', this._sync.bind(this));
if (this._buttonBox.get_n_children() >= MAX_NOTIFICATION_BUTTONS)
return null;
- this._buttonBox.add(button);
+ this._buttonBox.add_child(button);
button.connect('clicked', () => {
callback();
width: size * scaleFactor,
});
- this.add_actor(this._iconBin);
+ this.add_child(this._iconBin);
this._source.connectObject('icon-updated',
this._updateIcon.bind(this), this);
this._onNotificationKeyRelease.bind(this));
this._bannerBin.connect('notify::hover',
this._onNotificationHoverChanged.bind(this));
- this.add_actor(this._bannerBin);
+ this.add_child(this._bannerBin);
this._notificationFocusGrabber = new FocusGrabber(this._bannerBin);
this._notificationQueue = [];
'done-displaying', this._escapeTray.bind(this),
'unfocused', () => this._updateState(), this);
- this._bannerBin.add_actor(this._banner);
+ this._bannerBin.add_child(this._banner);
this._bannerBin.opacity = 0;
this._bannerBin.y = -this._banner.height;
this._shouldFadeOut = params.shouldFadeOut;
this._destroyOnClose = params.destroyOnClose;
- Main.layoutManager.modalDialogGroup.add_actor(this);
+ Main.layoutManager.modalDialogGroup.add_child(this);
const constraint = new Clutter.BindConstraint({
source: global.stage,
this._backgroundBin = new St.Bin({child: this.backgroundStack});
this._monitorConstraint = new Layout.MonitorConstraint();
this._backgroundBin.add_constraint(this._monitorConstraint);
- this.add_actor(this._backgroundBin);
+ this.add_child(this._backgroundBin);
this.dialogLayout = new Dialog.Dialog(this.backgroundStack, params.styleClass);
this.contentLayout = this.dialogLayout.contentLayout;
this._lightbox.highlight(this._backgroundBin);
this._eventBlocker = new Clutter.Actor({reactive: true});
- this.backgroundStack.add_actor(this._eventBlocker);
+ this.backgroundStack.add_child(this._eventBlocker);
}
global.focus_manager.add_group(this.dialogLayout);
this._box = new St.BoxLayout({
vertical: true,
});
- this.add_actor(this._box);
+ this.add_child(this._box);
this._label = new St.Label({
style_class: 'osd-monitor-label',
text: label,
});
- this._box.add(this._label);
+ this._box.add_child(this._label);
Main.uiGroup.add_child(this);
Main.uiGroup.set_child_above_sibling(this, null);
this._hbox = new St.BoxLayout({
style_class: 'osd-window',
});
- this.add_actor(this._hbox);
+ this.add_child(this._hbox);
this._icon = new St.Icon({y_expand: true});
this._hbox.add_child(this._icon);
this.set_checked(false);
});
this._padChooserMenu.actor.hide();
- Main.uiGroup.add_actor(this._padChooserMenu.actor);
+ Main.uiGroup.add_child(this._padChooserMenu.actor);
this._menuManager = new PopupMenu.PopupMenuManager(this);
this._menuManager.addMenu(this._padChooserMenu);
this.set_checked(false);
});
this._editMenu.actor.hide();
- Main.uiGroup.add_actor(this._editMenu.actor);
+ Main.uiGroup.add_child(this._editMenu.actor);
this._editMenuManager = new PopupMenu.PopupMenuManager(this);
this._editMenuManager.addMenu(this._editMenu);
this._actionComboBox = new ActionComboBox();
this._actionComboBox.connect('action-selected', this._onActionSelected.bind(this));
- this.add_actor(this._actionComboBox);
+ this.add_child(this._actionComboBox);
this._keybindingEdit = new KeybindingEntry();
this._keybindingEdit.connect('keybinding-edited', this._onKeybindingEdited.bind(this));
- this.add_actor(this._keybindingEdit);
+ this.add_child(this._keybindingEdit);
this._doneButton = new St.Button({
label: _('Done'),
x_expand: false,
});
this._doneButton.connect('clicked', this._onEditingDone.bind(this));
- this.add_actor(this._doneButton);
+ this.add_child(this._doneButton);
}
_updateKeybindingEntryState() {
set editorActor(actor) {
actor.hide();
this._editorActor = actor;
- this.add_actor(actor);
+ this.add_child(actor);
}
_initLabels() {
let label = new St.Label();
this._labels.push({label, action, idx, dir, x, y, arrangement});
- this.add_actor(label);
+ this.add_child(label);
return true;
}
});
this.connect('destroy', this._onDestroy.bind(this));
- Main.uiGroup.add_actor(this);
+ Main.uiGroup.add_child(this);
this._monitorIndex = monitorIndex;
let constraint = new Layout.MonitorConstraint({index: monitorIndex});
x_expand: false,
x_align: Clutter.ActorAlign.CENTER,
});
- this.add_actor(this._titleBox);
+ this.add_child(this._titleBox);
const labelBox = new St.BoxLayout({
style_class: 'pad-osd-title-menu-box',
vertical: true,
});
- this._titleBox.add_actor(labelBox);
+ this._titleBox.add_child(labelBox);
this._titleLabel = new St.Label({
style: 'font-side: larger; font-weight: bold;',
});
this._titleLabel.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
this._titleLabel.clutter_text.set_text(padDevice.get_device_name());
- labelBox.add_actor(this._titleLabel);
+ labelBox.add_child(this._titleLabel);
this._tipLabel = new St.Label({x_align: Clutter.ActorAlign.CENTER});
- labelBox.add_actor(this._tipLabel);
+ labelBox.add_child(this._tipLabel);
this._updatePadChooser();
x_expand: true,
y_expand: true,
});
- this.add_actor(this._padDiagram);
+ this.add_child(this._padDiagram);
this._updateActionLabels();
const buttonBox = new St.Widget({
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
});
- this.add_actor(buttonBox);
+ this.add_child(buttonBox);
this._editButton = new St.Button({
label: _('Edit…'),
style_class: 'button',
this._editButton.connect('clicked', () => {
this.setEditionMode(true);
});
- buttonBox.add_actor(this._editButton);
+ buttonBox.add_child(this._editButton);
this._syncEditionMode();
this._grab = Main.pushModal(this);
this._updateIndicator(indicator, pageIndex);
});
this._updateIndicator(indicator, pageIndex);
- this.add_actor(indicator);
+ this.add_child(indicator);
}
} else {
let children = this.get_children().splice(diff);
this._targetApp = null;
let bin = new St.Bin({name: 'appMenu'});
- this.add_actor(bin);
+ this.add_child(bin);
this.bind_property('reactive', this, 'can-focus', 0);
this.reactive = false;
y_align: Clutter.ActorAlign.CENTER,
});
this._iconBox.add_effect(iconEffect);
- this._container.add_actor(this._iconBox);
+ this._container.add_child(this._iconBox);
this._iconBox.connect('style-changed', () => {
let themeNode = this._iconBox.get_theme_node();
y_expand: true,
y_align: Clutter.ActorAlign.CENTER,
});
- this._container.add_actor(this._label);
+ this._container.add_child(this._label);
this._visible = !Main.overview.visible;
if (!this._visible)
animate: true,
hideOnStop: true,
});
- this._container.add_actor(this._spinner);
+ this._container.add_child(this._spinner);
let menu = new AppMenu(this);
this.setMenu(menu);
this.remove_style_pseudo_class('overview');
});
- Main.layoutManager.panelBox.add(this);
+ Main.layoutManager.panelBox.add_child(this);
Main.ctrlAltTabManager.addGroup(this,
_('Top Bar'), 'focus-top-bar-symbolic',
{sortGroup: CtrlAltTab.SortGroup.TOP});
let parent = container.get_parent();
if (parent)
- parent.remove_actor(container);
+ parent.remove_child(container);
box.insert_child_at_index(container, position);
this.menu.connect('open-state-changed', this._onOpenStateChanged.bind(this));
this.menu.actor.connect('key-press-event', this._onMenuKeyPress.bind(this));
- Main.uiGroup.add_actor(this.menu.actor);
+ Main.uiGroup.add_child(this.menu.actor);
this.menu.actor.hide();
}
this.emit('menu-set');
_addIndicator() {
let icon = new St.Icon({style_class: 'system-status-icon'});
- this.add_actor(icon);
+ this.add_child(icon);
icon.connect('notify::visible', this._syncIndicatorsVisible.bind(this));
this._syncIndicatorsVisible();
return icon;
let [x, y] = global.get_pointer();
this._pieTimer = new PieTimer();
- Main.uiGroup.add_actor(this._pieTimer);
+ Main.uiGroup.add_child(this._pieTimer);
Main.uiGroup.set_child_above_sibling(this._pieTimer, null);
this._pieTimer.start(x, y, timeout);
this._delegate = this;
this._ornamentIcon = new St.Icon({style_class: 'popup-menu-ornament'});
- this.add(this._ornamentIcon);
+ this.add_child(this._ornamentIcon);
this.setOrnament(Ornament.HIDDEN);
this._parent = null;
});
this.label = new St.Label({text: text || ''});
- this.add(this.label);
+ this.add_child(this.label);
this.label_actor = this.label;
this.label.connect('notify::text',
addMenuItem(menuItem, position) {
let beforeItem = null;
if (position === undefined) {
- this.box.add(menuItem.actor);
+ this.box.add_child(menuItem.actor);
} else {
let items = this._getMenuItems();
if (position < items.length) {
beforeItem = items[position].actor;
this.box.insert_child_below(menuItem.actor, beforeItem);
} else {
- this.box.add(menuItem.actor);
+ this.box.add_child(menuItem.actor);
}
}
menuItem);
} else if (menuItem instanceof PopupSubMenuMenuItem) {
if (beforeItem == null)
- this.box.add(menuItem.menu.actor);
+ this.box.add_child(menuItem.menu.actor);
else
this.box.insert_child_below(menuItem.menu.actor, beforeItem);
vscrollbar_policy: St.PolicyType.NEVER,
});
- this.actor.add_actor(this.box);
+ this.actor.add_child(this.box);
this.actor._delegate = this;
this.actor.clip_to_allocation = true;
this.actor.connect('key-press-event', this._onKeyPressEvent.bind(this));
_addIndicator() {
const icon = new St.Icon({style_class: 'system-status-icon'});
- this.add_actor(icon);
+ this.add_child(icon);
icon.connect('notify::visible', () => this._syncIndicatorsVisible());
this._syncIndicatorsVisible();
return icon;
throw new Error('Ripples already added');
this._stage = stage;
- this._stage.add_actor(this._ripple1);
- this._stage.add_actor(this._ripple2);
- this._stage.add_actor(this._ripple3);
+ this._stage.add_child(this._ripple1);
+ this._stage.add_child(this._ripple2);
+ this._stage.add_child(this._ripple3);
}
playAnimation(x, y) {
let title = _('Run a Command');
let content = new Dialog.MessageDialogContent({title});
- this.contentLayout.add_actor(content);
+ this.contentLayout.add_child(content);
let entry = new St.Entry({
style_class: 'run-dialog-entry',
name: 'lockDialogGroup',
});
- this.actor.add_actor(this._lockScreenGroup);
- this.actor.add_actor(this._lockDialogGroup);
+ this.actor.add_child(this._lockScreenGroup);
+ this.actor.add_child(this._lockDialogGroup);
this._presence = new GnomeSession.Presence((proxy, error) => {
if (error) {
x: 0,
y: 0,
});
- Main.uiGroup.add_actor(this);
+ Main.uiGroup.add_child(this);
this._grabHelper = new GrabHelper.GrabHelper(this);
style_class: 'select-area-rubberband',
visible: false,
});
- this.add_actor(this._rubberband);
+ this.add_child(this._rubberband);
}
async selectAsync() {
this._color = null;
this._inPick = false;
- Main.uiGroup.add_actor(this);
+ Main.uiGroup.add_child(this);
this._grabHelper = new GrabHelper.GrabHelper(this);
effect: this._recolorEffect,
visible: false,
});
- Main.uiGroup.add_actor(this._previewCursor);
+ Main.uiGroup.add_child(this._previewCursor);
}
async pickAsync() {
// An icon for, or thumbnail of, content
let icon = this.metaInfo['createIcon'](this.ICON_SIZE);
if (icon)
- titleBox.add(icon);
+ titleBox.add_child(icon);
let title = new St.Label({
text: this.metaInfo['name'],
this.add_child(this._resultDisplayBin);
let separator = new St.Widget({style_class: 'search-section-separator'});
- this.add(separator);
+ this.add_child(separator);
this._resultDisplays = {};
}
_addItem(display) {
- this._content.add_actor(display);
+ this._content.add_child(display);
}
getFirstResult() {
y_expand: true,
});
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
- this._scrollView.add_actor(this._content);
+ this._scrollView.add_child(this._content);
let action = new Clutter.PanAction({interpolate: true});
action.connect('pan', this._onPan.bind(this));
});
this._statusBin = new St.Bin({y_expand: true});
this.add_child(this._statusBin);
- this._statusBin.add_actor(this._statusText);
+ this._statusBin.add_child(this._statusText);
this._highlightDefault = false;
this._defaultResult = null;
providerDisplay.connect('notify::focus-child', this._focusChildChanged.bind(this));
providerDisplay.hide();
- this._content.add(providerDisplay);
+ this._content.add_child(providerDisplay);
provider.display = providerDisplay;
}
this._moreLabel = new St.Label({x_align: Clutter.ActorAlign.START});
- detailsBox.add_actor(nameLabel);
- detailsBox.add_actor(this._moreLabel);
+ detailsBox.add_child(nameLabel);
+ detailsBox.add_child(this._moreLabel);
- this._content.add_actor(icon);
- this._content.add_actor(detailsBox);
+ this._content.add_child(icon);
+ this._content.add_child(detailsBox);
}
get PROVIDER_ICON_SIZE() {
this._focusTrap.connect('key-focus-in', () => {
this._entry.grab_key_focus();
});
- this._searchResults.add_actor(this._focusTrap);
+ this._searchResults.add_child(this._focusTrap);
global.focus_manager.add_group(this._searchResults);
if (entry instanceof St.PasswordEntry)
this._makePasswordItem();
- Main.uiGroup.add_actor(this.actor);
+ Main.uiGroup.add_child(this.actor);
this.actor.hide();
}
});
this.indicator = new St.Label({text: shortName});
this.add_child(this.label);
- this.add(this.indicator);
+ this.add_child(this.indicator);
this.label_actor = this.label;
}
});
});
this.menu.addMenuItem(menuItem, menuIndex++);
- this._container.add_actor(indicatorLabel);
+ this._container.add_child(indicatorLabel);
}
}
style_class: 'wireless-secure-icon',
y_align: Clutter.ActorAlign.END,
});
- icons.add_actor(this._secureIcon);
+ icons.add_child(this._secureIcon);
this._label = new St.Label();
this.add_child(this._label);
style_class: 'popup-menu-icon',
icon_name: 'object-select-symbolic',
});
- this.add(this._selectedIcon);
+ this.add_child(this._selectedIcon);
this._network.bind_property('icon-name',
this._signalIcon, 'icon-name',
this.connect('destroy', this._onDestroy.bind(this));
- Main.uiGroup.add_actor(this);
+ Main.uiGroup.add_child(this);
Main.layoutManager.connectObject(
'system-modal-opened', () => this.destroy(), this);
this._haveModal = true;
this._modifierMask = primaryModifier(mask);
- this.add_actor(this._switcherList);
+ this.add_child(this._switcherList);
this._switcherList.connect('item-activated', this._itemActivated.bind(this));
this._switcherList.connect('item-entered', this._itemEntered.bind(this));
this._switcherList.connect('item-removed', this._itemRemoved.bind(this));
});
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.NEVER);
- this._scrollView.add_actor(this._list);
- this.add_actor(this._scrollView);
+ this._scrollView.add_child(this._list);
+ this.add_child(this._scrollView);
// Those arrows indicate whether scrolling in one direction is possible
this._leftArrow = new St.DrawingArea({
drawArrow(this._rightArrow, St.Side.RIGHT);
});
- this.add_actor(this._leftArrow);
- this.add_actor(this._rightArrow);
+ this.add_child(this._leftArrow);
+ this.add_child(this._rightArrow);
this._items = [];
this._highlighted = -1;
let bbox = new SwitcherButton(this._squareItems);
bbox.set_child(item);
- this._list.add_actor(bbox);
+ this._list.add_child(bbox);
bbox.connect('clicked', () => this._onItemClicked(bbox));
bbox.connect('motion-event', () => this._onItemMotion(bbox));
vertical: true,
style_class: 'unlock-dialog-notifications-container',
});
- this._scrollView.add_actor(this._notificationBox);
+ this._scrollView.add_child(this._notificationBox);
this.add_child(this._scrollView);
x_expand: true,
x_align: Clutter.ActorAlign.START,
});
- textBox.add(title);
+ textBox.add_child(title);
let count = source.unseenCount;
let countLabel = new St.Label({
visible: count > 1,
style_class: 'unlock-dialog-notification-count-text',
});
- textBox.add(countLabel);
+ textBox.add_child(countLabel);
box.visible = count !== 0;
return [title, countLabel];
_makeNotificationDetailedSource(source, box) {
let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
let sourceBin = new St.Bin({child: sourceActor});
- box.add(sourceBin);
+ box.add_child(sourceBin);
let textBox = new St.BoxLayout({vertical: true});
box.add_child(textBox);
text: source.title.replace(/\n/g, ' '),
style_class: 'unlock-dialog-notification-label',
});
- textBox.add(title);
+ textBox.add_child(title);
let visible = false;
for (let i = 0; i < source.notifications.length; i++) {
let label = new St.Label({style_class: 'unlock-dialog-notification-count-text'});
label.clutter_text.set_markup(`<b>${n.title}</b> ${body}`);
- textBox.add(label);
+ textBox.add_child(label);
visible = true;
}
class TilePreview extends St.Widget {
_init() {
super._init();
- global.window_group.add_actor(this);
+ global.window_group.add_child(this);
this._reset();
this._showing = false;
y_expand: true,
});
this.add_child(this._label);
- Main.uiGroup.add_actor(this);
+ Main.uiGroup.add_child(this);
}
set(rect, displayW, displayH) {
this.actor.add_style_class_name('window-menu');
- Main.layoutManager.uiGroup.add_actor(this.actor);
+ Main.layoutManager.uiGroup.add_child(this.actor);
this.actor.hide();
this._buildMenu(window);
this._sourceActor.connect('button-press-event', () => {
this._manager.activeMenu.toggle();
});
- Main.uiGroup.add_actor(this._sourceActor);
+ Main.uiGroup.add_child(this._sourceActor);
}
showWindowMenuForWindow(window, type, rect) {
if (this._workspace) {
this._background = new Meta.BackgroundGroup();
- this.add_actor(this._background);
+ this.add_child(this._background);
this._bgManager = new Background.BackgroundManager({
container: this._background,
const constraint = new Layout.MonitorConstraint({primary: true});
this.add_constraint(constraint);
- Main.uiGroup.add_actor(this);
+ Main.uiGroup.add_child(this);
this._timeoutId = 0;
if (i === this._activeWorkspaceIndex)
indicator.add_style_pseudo_class('active');
- this._list.add_actor(indicator);
+ this._list.add_child(indicator);
}
}
clone.connect('destroy', () => {
this._removeWindowClone(clone.metaWindow);
});
- this._contents.add_actor(clone);
+ this._contents.add_child(clone);
if (this._windows.length > 0)
clone.setStackAbove(this._windows[this._windows.length - 1]);
Shell.util_set_hidden_from_pick(indicator, true);
this._indicator = indicator;
- this.add_actor(indicator);
+ this.add_child(indicator);
this._monitorIndex = monitorIndex;
this._dropWorkspace = -1;
this._dropPlaceholderPos = -1;
this._dropPlaceholder = new St.Bin({style_class: 'placeholder'});
- this.add_actor(this._dropPlaceholder);
+ this.add_child(this._dropPlaceholder);
this._spliceIndex = -1;
this._maxThumbnailScale = MAX_THUMBNAIL_SCALE;
this._porthole.x, this._porthole.y,
this._porthole.width, this._porthole.height);
this._thumbnails.push(thumbnail);
- this.add_actor(thumbnail);
+ this.add_child(thumbnail);
if (this._shouldShow && start > 0 && this._spliceIndex === -1) {
// not the initial fill, and not splicing via DND
metaWorkspace,
this._monitorIndex,
this._overviewAdjustment);
- this.add_actor(workspace);
+ this.add_child(workspace);
this._workspaces[j] = workspace;
} else {
workspace = this._workspaces[j];
super._init(monitorIndex, overviewAdjustment);
this._workspace =
new Workspace.Workspace(null, monitorIndex, overviewAdjustment);
- this.add_actor(this._workspace);
+ this.add_child(this._workspace);
}
_updateWorkspaceMode() {
this._scrollAdjustment,
this._fitModeAdjustment,
this._overviewAdjustment);
- Main.layoutManager.overviewGroup.add_actor(view);
+ Main.layoutManager.overviewGroup.add_child(view);
}
this._workspacesViews.push(view);
// Used as a drag actor in case we don't have a cursor window clone
this._dummy = new Clutter.Actor({width: 1, height: 1, opacity: 0});
- Main.uiGroup.add_actor(this._dummy);
+ Main.uiGroup.add_child(this._dummy);
this._dummy.hide();
var dnd = global.backend.get_dnd();
});
this._cursorWindowClone = new Clutter.Clone({source: cursorWindow});
- Main.uiGroup.add_actor(this._cursorWindowClone);
+ Main.uiGroup.add_child(this._cursorWindowClone);
// Make sure that the clone has the same position as the source
this._cursorWindowClone.add_constraint(constraintPosition);